vmupdate: wait for other apt-get to complete#174
Conversation
If there is an `apt-get update` running in the background (for example periodical updates check), running another would fail. Since `apt-get` itself doesn't have an option to wait for the lock, wait for it in the updater tool. It's not perfect - there is still a window where another apt-get instance can start, but at least this will handle the (more common) situation when it's already running.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #174 +/- ##
=======================================
Coverage 73.03% 73.03%
=======================================
Files 10 10
Lines 1157 1157
=======================================
Hits 845 845
Misses 312 312 ☔ View full report in Codecov by Sentry. |
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2024121602-4.3&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2024111705-4.3&flavor=update
Failed tests4 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/119126#dependencies 3 fixed
Unstable testsDetails
|
If there is an
apt-get updaterunning in the background (for exampleperiodical updates check), running another would fail. Since
apt-getitself doesn't have an option to wait for the lock, wait for it in the
updater tool. It's not perfect - there is still a window where another
apt-get instance can start, but at least this will handle the (more
common) situation when it's already running.